home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / patch / ds101110.lha / ds101110pch / Patch < prev    next >
Text File  |  1997-01-13  |  4KB  |  191 lines

  1. ; drawSTUDIO Patch Utility
  2. ;
  3. ; This script is Copyright ©1995,1996 Graham Dean and Andy Dean
  4. ;
  5.  
  6. (set version "v1.1.0")
  7.  
  8. (
  9.     ; Welcome
  10.  
  11.     (message "Welcome to the drawSTUDIO patch. This will patch "
  12.         "v1.0.1 of drawSTUDIO to " version " Your "
  13.         "original copy of drawSTUDIO will be renamed, in case "
  14.         "the patch fails for any reason. Both English and "
  15.         "German language versions can be installed from "
  16.         "this patch.\n\n"
  17.         "You will need your orginal drawSTUDIO disks and "
  18.         "your registration number before you proceed.\n\n"
  19.         "This patch is Copyright 1996-1997 Graham Dean and "
  20.         "Andy Dean."
  21.  
  22.     )
  23.  
  24.     ; Ask where to install it...
  25.  
  26.     (set destdir
  27.         (askdir
  28.             (prompt "Select the directory where your current "
  29.                 "version of drawSTUDIO is installed.")
  30.             (help "This is where the new version of "
  31.                 "drawSTUDIO will be placed.")
  32.             (default @default-dest)
  33.             (disk)
  34.         )
  35.     )
  36.  
  37.     (set @default-dest destdir)
  38.     
  39.     ; Shall we patch the FPU version ?
  40.  
  41.     (set fpuversion
  42.         (askchoice
  43.             (prompt "Select whether you are patching the "
  44.                 "Standard or the FPU version of drawSTUDIO:")
  45.             (help "You may update either of the versions using "
  46.                 "this patch, but you cannot change the "
  47.                 "Standard version to the FPU version, or "
  48.                 "the FPU version to the Standard.")
  49.             (choices "Standard" "FPU optimised")
  50.         )
  51.     )
  52.  
  53.     ; Language
  54.  
  55.     (set language
  56.         (askchoice
  57.             (prompt "Choose the language you wish drawSTUDIO "
  58.                 "to use:")
  59.             (help "Both English and German languages are "
  60.                 "supported in this patch. Choose "
  61.                 "the version you want drawSTUDIO to "
  62.                 "throughout the program.")
  63.             (choices "English" "German")
  64.         )
  65.     )
  66.  
  67.     ; Copy original
  68.  
  69.     (working "Backing up orginal...")
  70.  
  71.     (set srcprog (tackon destdir "DrawStudio"))
  72.     (set bakprog (tackon destdir "DrawStudioOLD"))
  73.  
  74.     (copyfiles
  75.         (source (srcprog))
  76.         (dest (bakprog))
  77.         (newname ("DrawStudio"))
  78.         (infos)
  79.     )
  80.  
  81.     ;(run "copy " srcprog bakprog)
  82.  
  83.     ;(set srcprog (tackon destdir "DrawStudio.info"))
  84.     ;(set bakprog (tackon destdir "DrawStudioOLD.info"))
  85.  
  86.     ;(run "copy " srcprog bakprog)
  87.  
  88.     ; Set up decompressor to work with
  89.  
  90.     (working "Setting up files...")
  91.  
  92.     (copyfiles
  93.         (source ("spatch"))
  94.         (dest ("T:"))
  95.     )
  96.  
  97.     (copyfiles
  98.         (source ("DrawStudio_1:"))
  99.         (dest ("T:"))
  100.         (choices "lx" "pcefis")
  101.     )
  102.  
  103.     (working "Decompressing patch...")
  104.  
  105.     (complete 10)
  106.  
  107.     (if (= 0 fpuversion)
  108.         (run ("t:pcefis dsNON101110.lha T:"))
  109.  
  110.         (run ("t:pcefis dsFPU101110.lha T:"))
  111.     )
  112.  
  113.     (working "Decompressing drawSTUDIO program...")
  114.  
  115.     (complete 30)
  116.  
  117.     (if (= 0 fpuversion)
  118.         (
  119.             (run ("t:pcefis drawSTUDIO_1:drawSTUDIONON.lha T:"))
  120.         )
  121.  
  122.         (
  123.             (askdisk (dest "drawSTUDIO_2") (assigns)
  124.             (prompt "Please insert disk drawSTUDIO_2")
  125.             (help "Insert Disk 2 in any drive. You may "
  126.                 "remove Disk 1, it will not be needed again."))
  127.  
  128.             (working "Decompressing drawSTUDIO program...")
  129.  
  130.             (run ("t:pcefis drawSTUDIO_2:drawSTUDIO881.lha T:"))
  131.         )
  132.     )
  133.     
  134.     (complete 60)
  135.  
  136.     (working "Patching program. This may take some time...")
  137.  
  138.     (run "t:spatch -pT:patch.pch -oT:DrawStudio.new T:DrawStudio")
  139.  
  140.     ; Copy the patched file back to the disk
  141.  
  142.     (complete 80)
  143.  
  144.     (working "Copying new program...")
  145.  
  146.     (copyfiles
  147.         (source ("T:DrawStudio.new"))
  148.         (dest (destdir))
  149.         (newname ("DrawStudio"))
  150.     )
  151.  
  152.     ; Language files
  153.  
  154.     (complete 90)
  155.  
  156.     (if (= 0 language)
  157.         (copyfiles
  158.             (source ("LanguageEng.msg"))
  159.             (dest (destdir))
  160.             (newname ("Language.msg"))
  161.         )
  162.  
  163.         (copyfiles
  164.             (source ("LanguageDeu.msg"))
  165.             (dest (destdir))
  166.             (newname ("Language.msg"))
  167.         )
  168.     )
  169.  
  170.     ; Cleanup
  171.  
  172.     (delete ("t:LX"))
  173.     (delete ("t:pcefis"))
  174.     (delete ("t:DrawStudio"))
  175.     (delete ("t:DrawStudio.new"))
  176.     (delete ("t:spatch"))
  177.     (delete ("t:patch.pch"))
  178.  
  179.     ; Say goodbye
  180.  
  181.     (set endmessage (cat "Your copy of drawSTUDIO has now been "
  182.         "patched to " version " and your old version has "
  183.         "been placed in the DrawStudioOLD directory. You will "
  184.         "need to enter your registration number again when "
  185.         "you run the program for the first time."))
  186.  
  187.     (complete 100)
  188.  
  189.     (message endmessage)
  190. )
  191.